package mediator;

/**
 * 客户端测试
 *
 * @author zhang he qiang
 */
public class MediatorPattern {
    public static void main(String[] args)
    {
        //创建中介者对象
        Mediator md=new ConcreteMediator();
        //创建同事对象
        Colleague c1,c2;

        c1=new ConcreteColleague1();
        c2=new ConcreteColleague2();
        md.register(c1);
        md.register(c2);
        c1.send();
        System.out.println("-------------");
        c2.send();
    }
}
